import UIKit

// 拼接
// 格式化
let min = 2
let second = 9
let timeString1 = "0\(min): 0\(second)"
let timeString2 = String(format: "%02d:%02d", min,second)


// 截取
let urlString = "www.520it.com"

let header = (urlString as NSString).substring(to: 3)
let middle = (urlString as NSString).substring(with: NSMakeRange(4, 5))
let footer = (urlString as NSString).substring(from: 10)
print(timeString2)
